import {BasicLayout} from '../layout/index.js'
import RouteView from '@src/layout/RouteView.js'

/**
 * 暂时不做用户登录的逻辑，可能每一个公司的登入方式都不一样，那么可能就需要重新设计登入
 *
 * 后续，我们能不能看看，可以将 登录页 + 路由 + 逻辑，单独抽离为一个 插件，我们可以配置，供用户选择
 *  比如： 默认的登录方式
 *        其他 登入方式
 */

export const asyncRouters = [
  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    redirect: '/workplace',
    meta: { title: 'menu.home' },
    children: [
      // 首页
      {
        path: '/workplace',
        name: 'workplace',
        meta: { title: '首页', keepAlive: true, icon: 'el-icon-s-home', permission: [ '' ] },
        component: () => import('@src/page/workplace/index.vue')
      },
      // 表单页
      {
        path: '/form',
        redirect: '/form/base-form',
        component: RouteView,
        meta: { title: '表单页', keepAlive: true, icon: 'el-icon-s-grid', permission: [ '' ] },
        children: [
          {
            path: '/form/base-form',
            name: 'base-form',
            component: () => import('@src/page/form/index.vue'),
            meta: { title: '基础表单', icon: 'el-icon-s-marketing', keepAlive: true, permission: [ '' ] }
          },
          {
            path: '/form/dynamic-form',
            name: 'dynamic-form',
            component: () => import('@src/page/form/dynamic-form.vue'),
            meta: { title: '动态表单', icon: 'el-icon-s-promotion', keepAlive: true, permission: [ '' ] }
          }
        ]
      }
    ]
  }
]


export const baseRouters = [

]
